package com.sunwayhorizo.health.hl7.persistent;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import com.sunwayhorizo.health.hl7.persistent.pk.RimCoreRoleCdSetsPK;

/**
 * 
* @Title: RimCoreEntyCdSets.java
* @Package com.sunwayhorizo.health.hl7.persistent
* @Description: 新增三个字段 CODINGSCHEME_CH_NAME CODINGSCHEME_EN_NAME CONCEPT_Name
*               去掉一个字段  CODINGSCHEME_NAME
* @version V1.0
* @firstAuthor robo
* @firstTime   2010-11-30 下午07:50:23
* @lastAuthor  jinzw
* @lastTime    2010-11-30 下午07:50:23 
* @updComment  建立RimCoreRoleCdSets与RimCoreRoles的关系，并完成对应的get set方法
 */
@Entity
//@TableGenerator(name="RoleCdSets_IdGenerator", table="RIM_Id_Generator", pkColumnName = "pkColumn", valueColumnName = "valueColumn",pkColumnValue="Role_CdSets")
//@NamedQuery(name = "RimCoreRoleCdSets.findAll",     query = "select o from RimCoreRoleCdSets o")
@Table(name = "RIM_CORE_ROLE_CD_SETS")
@IdClass(RimCoreRoleCdSetsPK.class)
public class RimCoreRoleCdSets implements Serializable {
    /**
     * 
     */
    private static final long serialVersionUID = 1L;

    @Id
//    @GeneratedValue(strategy = GenerationType.TABLE,generator = "RoleCdSets_IdGenerator" )
    @Column(name="ROLE_CODE_SET_ID", nullable = false)    
    private Long roleCodeSetId;
    
    @Id
    @Column(name="ROLE_ID", nullable = false,insertable = false,  updatable = false)    
    private Long roleId;
    
    @Id
    @Column(name="ROLE_VERSION_NUM", nullable = false,insertable = false,  updatable = false)    
    private Long roleVersionNum;

    @Column(name="ATTRIBUTE_TYPE_CODE", nullable = false)    
    private String attributeTypeCode;
    
    @Column(name = "CODINGSCHEME_CH_NAME" )
	private String codingschemeChName;
	
	@Column(name = "CODINGSCHEME_EN_NAME" )
	private String codingschemeEnName;
	
    @Column(name="CODINGSCHEME_OID")    
    private String codingschemeOid;
    
    @Column(name="CODINGSCHEME_VERSION_NAME")    
    private String codingschemeVersionName;
    
    @Column(name="COERCED_CONCEPT_ID")   
    private String coercedConceptId;
    
    @Column(name="CONCEPT_CODE")   
    private String conceptCode;
    
    @Column(name="CONCEPT_NAME")   
    private String conceptName;
    
    @Column(name="INTERMEDIATE_CONCEPT_ID")   
    private String intermediateConceptId; 
    
    @Column(name="ORIGINAL_TEXT")    
    private String originalText;
    
    @ManyToOne
    @JoinColumns({
    @JoinColumn(name = "ROLE_ID", referencedColumnName = "ROLE_ID"),
    @JoinColumn(name = "ROLE_VERSION_NUM", referencedColumnName = "ROLE_VERSION_NUM")
    })
    private RimCoreRoles rimCoreRoles;
    
    public RimCoreRoleCdSets() {
    }

    public String getAttributeTypeCode() {
        return attributeTypeCode;
    }

    public void setAttributeTypeCode(String attributeTypeCode) {
        this.attributeTypeCode = attributeTypeCode;
    }

    public String getCodingschemeEnName() {
        return codingschemeEnName;
    }

    public void setCodingschemeEnName(String codingschemeEnName) {
        this.codingschemeEnName = codingschemeEnName;
    }
    

    public String getCodingschemeChName() {
		return codingschemeChName;
	}

	public void setCodingschemeChName(String codingschemeChName) {
		this.codingschemeChName = codingschemeChName;
	}

	public String getCodingschemeOid() {
        return codingschemeOid;
    }

    public void setCodingschemeOid(String codingschemeOid) {
        this.codingschemeOid = codingschemeOid;
    }

    public String getCodingschemeVersionName() {
        return codingschemeVersionName;
    }

    public void setCodingschemeVersionName(String codingschemeVersionName) {
        this.codingschemeVersionName = codingschemeVersionName;
    }

    public String getCoercedConceptId() {
        return coercedConceptId;
    }

    public void setCoercedConceptId(String coercedConceptId) {
        this.coercedConceptId = coercedConceptId;
    }

    public String getConceptCode() {
        return conceptCode;
    }

    public void setConceptCode(String conceptCode) {
        this.conceptCode = conceptCode;
    }
    
    public String getConceptName() {
		return conceptName;
	}

	public void setConceptName(String conceptName) {
		this.conceptName = conceptName;
	}

	public String getIntermediateConceptId() {
        return intermediateConceptId;
    }

    public void setIntermediateConceptId(String intermediateConceptId) {
        this.intermediateConceptId = intermediateConceptId;
    }

    public String getOriginalText() {
        return originalText;
    }

    public void setOriginalText(String originalText) {
        this.originalText = originalText;
    }

    public Long getRoleCodeSetId() {
        return roleCodeSetId;
    }

    public void setRoleCodeSetId(Long roleCodeSetId) {
        this.roleCodeSetId = roleCodeSetId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public Long getRoleVersionNum() {
        return roleVersionNum;
    }

    public void setRoleVersionNum(Long roleVersionNum) {
        this.roleVersionNum = roleVersionNum;
    }

    public void setRimCoreRoles(RimCoreRoles rimCoreRoles) {
        this.rimCoreRoles = rimCoreRoles;
    }

    public RimCoreRoles getRimCoreRoles() {
        return rimCoreRoles;
    }
 
}
